package com.spic.business.violation.supervision.information.service.impl;

import com.deepoove.poi.XWPFTemplate;
import com.spic.business.common.core.workflow.IWorkFlowType;
import com.spic.business.common.datascope.anotation.BusinessDataScope;
import com.spic.business.common.workflow.WorkFlowServiceImpl;
import com.spic.business.enumconst.BusinessType;
import com.spic.business.getui.service.PushService;
import com.spic.business.utils.GroupUtils;
import com.spic.business.violation.supervision.information.domain.ViolationInformation;
import com.spic.business.violation.supervision.information.domain.ViolationInformationDirty;
import com.spic.business.violation.supervision.information.mapper.ViolationInformationDirtyMapper;
import com.spic.business.violation.supervision.information.mapper.ViolationInformationMapper;
import com.spic.business.violation.supervision.information.service.IViolationInformationDirtyService;
import com.spic.business.violation.supervision.information.service.IViolationInformationService;
import com.spic.common.core.domain.R;
import com.spic.common.core.utils.DateUtils;
import com.spic.common.core.utils.IdUtils;
import com.spic.common.core.utils.SecurityUtils;
import com.spic.common.core.utils.StringUtils;
import com.spic.system.api.RemoteDeptService;
import com.spic.system.api.RemoteFileService;
import com.spic.system.api.RemoteNoticeInfoService;
import com.spic.system.api.RemoteUserService;
import com.spic.system.api.domain.SysFile;
import com.spic.system.api.domain.SysNoticeInfo;
import com.spic.system.api.domain.SysUser;
import org.apache.commons.compress.utils.IOUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.io.ClassPathResource;
import org.springframework.mock.web.MockMultipartFile;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.*;
import java.nio.charset.StandardCharsets;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ThreadPoolExecutor;

/**
 * 违章举报Service业务层处理
 *
 * @author spic
 * @date 2021-10-14
 */
@Service
public class ViolationInformationDirtyServiceImpl implements IViolationInformationDirtyService {
    @Autowired
    private ViolationInformationDirtyMapper violationInformationDirtyMapper;
    @Autowired
    private ViolationInformationMapper violationInformationMapper;

    @Override
    public List<ViolationInformationDirty> selectViolationInformationDirtyList(ViolationInformationDirty informationDirty) {
        return violationInformationDirtyMapper.selectViolationInformationList(informationDirty);
    }

    @Override
    public Map<String, Integer> statistics() {
        Integer all = 0, allDirty = 0, incomplete = 0, incorrect = 0;
        all = violationInformationMapper.allCount();
        allDirty = violationInformationDirtyMapper.allDirtyCount();
        Map<String, Integer> map = new HashMap<>();
        map.put("all", all);
        map.put("allDirty", allDirty);
        map.put("incomplete", incomplete);
        map.put("incorrect", allDirty);
        return map;
    }
}
